Property Expressions Exercise 4
Exercise 4: Length
Objective
To use Length to change the extension of a file name.
Summary
Utilizing the Length in combination with SubStr, modify the extension of the files that are specified. These files will be changed from .csv to .xlsx.
Instructions
Create the Schedule
- Create a Multi-Instance Schedule called Length Schedule
- Define the following Schedule Instance Properties:
- FILENAME = AccountGaby.csv
- FILENAME = AccountRaul.csv
- FILENAME = AccountMike.csv
- FILENAME = AccountPaulius.csv
- FILENAME = AccountKelly.csv
- FILENAME = AccountRyan.csv
- FILENAME = AccountMatt.csv
- FILENAME = AccountDavid.csv
Create the Job
- Create a Null Job that will send a Notification that includes the File Name and Length when the job Finishes OK.
- Email: smauser@congo.local
- Example: [[SI.FILENAME]] is [[=Length([[SI.FILENAME]])]] characters in length.
- Create a File Copy Job that will rename the file, keeping its root name but replacing the extension with
xlsx.
- The CSV files are located in
C:\Accounting - Source:
“C:\Accounting\[[SI.FILENAME]]” - Destination:
C:\Accounting\[[=SubStr([[SI.FILENAME]],0,Length([[SI.FILENAME]])-4)]].xlsx
Build the Schedule
- Build the schedule for today's date.
note
Verify that the files were copied and have the correct extension on them.
